package com.warehouseconsumer.controller;

import com.warehouseconsumer.service.ZRouteConsumerService;
import entity.ResponseMessage;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
@CrossOrigin
@RequestMapping("/route")
public class ZRouteConsumerController {
    private Logger logger=Logger.getLogger(this.getClass());

    @Resource
    private ZRouteConsumerService zRouteConsumerService;

    /**
     * 查询路线
     * @return
     */
    @RequestMapping("/getRouteToStronger")
    @ResponseBody
    public ResponseMessage getRouteToStronger(){
        logger.info("ZRouteController route getRouteToStronger is start...");
        ResponseMessage msg=new ResponseMessage();
        msg=zRouteConsumerService.getRouteToStronger();
        return msg;
    }
}
